fdm is a simple, lightweight replacement for mail fetch, filter and
delivery programs such as fetchmail and procmail. It can fetch using
POP3 or IMAP (with SSL) or from stdin, and deliver to a pipe, file,
maildir, mbox or SMTP server, based on regexps.
